#pragma once

#include "Vector3f.h"

class Ray {
public:
    Ray();
    Ray(const Vector3f& origin, const Vector3f& dir, float maxT = -1.0);
    Vector3f origin, dir;
    float maxT;

    Vector3f point(float t) const;

    bool isInRange(float t) const;

    bool timeInRect(float& minT, float& maxT, float minX, float maxX, float minY, float maxY) const;

    float timeToX(float x) const;
    float timeToY(float y) const;
};
